$(document).ready(function(){
    //Login
    var init={
        loginBtn:$('.login-btn'),
        unameBox:$('.username'),
        pwdBox: $(".password"),
        tBtn: $('.tleft'),
        rBtn: $('.bfts')
    };
    init.tBtn.click(function (e) {
        if ($(this).text() == '按日显示') {
            $(this).text("按月显示")
        } else {
            $(this).text("按日显示")
        }
         
    })
    init.rBtn.click(function () {
        $(this).text("按金额显示")
    })
    //init.loginBtn.click(function(){
    //    if(init.unameBox.val()==''||init.pwdBox.val()==''){
    //        alert('用户名和密码不能为空!')
    //    }
    //});
    //index
    var today = new Date();
    $("#left-menu").on('tap', function (event) {  
        mui('.mui-off-canvas-wrap').offCanvas('show');  
    }); 
    window.onload = function(){  
        mui('#offCanvasSideScroll').scroll();    
        mui('#offCanvasContentScroll').scroll();   
    }
    $.selectDate(".dateBtn",{
        start:today.getFullYear()-5,
        end:today.getFullYear(),
        select:[today.getFullYear(),today.getMonth()+1,today.getDate()],
    },function (data) {
        console.log(data);
        });

    $.selectDates(".dateBtns", {
        start: today.getFullYear() - 5,
        end: today.getFullYear(),
        select: [today.getFullYear(), today.getMonth() + 1, today.getDate()],
    }, function (data) {
        console.log(data);
    });

    $(".search-list-item a").click(function(){
        $(this).addClass("cur").siblings().removeClass("cur")
    })
    $(".bottom-aide span").click(function(){
       $("#bottomSearch").removeClass("mui-active");
       $(".mui-backdrop").remove();
    })
})

